home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
pc_files
/
mktdata
/
econdata
/
docutils
/
pdgsup.exe
/
COMPARE.DOC
< prev
next >
Wrap
Text File
|
1992-06-19
|
6KB
|
126 lines
June 1992 COMPARE 5.1
The Compare program is used to make tables with the results of running
model. As the name suggests, it is particularly adapted to comparing
results of several runs of a model, but it can also list the contents of a
data bank or the results of a single run of a model. When being used to
show a base case and several alternatives, it can show the alternatives as
actual values, or as deviations from the base, or as percentage deviations
from the base. The results are written to a file which can then be sent
to a printer.
To use Compare, one first prepares a "stub" file such as this one for
the AMI model.
85.0 86.0 87.0 86.1 86.2 86.3 86.4 87.1 87.2 87.3 87.4
*
;
; THE AMI MODEL
;
@
;
gnp$ ;Gross national product
c$ ;Personal consumption
pibg$ ;Pers. income w/o gov't
pidis$ ;Personal disposable income
taxrate*100 ;taxrate*100 *
gtnis$ ;Gov trans, net int, sub.
cpc$ ;consumption per capita
pop*1000;population (in millions) *
100*(gnp$-gnp$[1])/gnp$[1] ;GNP growth rate
The first line must always give the dates of the periods which are to be
printed. In a quarterly data bank or model, an annual date such as "82.0"
will print the annual average for the year. COMPARE has several editing
features which are controlled by special characters at the beginning of a
line. They are:
* Go to the top of a new page and print the titles of the
alternatives runs as given in the ".fix" file.
* m If there is not room for m more items on the page, go to
a new page and print the dates across the top.
* m n If there is not room on the page for m more items plus n
lines, go to a new page and print the names of the base
and alternative runs.
; Print the line just as it stands.
@ Print the dates across the page above the appropriate
columns.
\ fw dp pl tm bm tw
where fw dp pl tm bm and tw are all numbers. This is an
optional line to set the field width of each printed number
to fw, the number of decimal places to be printed to dp, the
page length to pl lines, the top margin tm lines, the
bottom margin to bm lines, and the width of the titles to
tw. The last three may be omitted. The default values
are 7 1 60 3 9 32.
\ g
where g is the letter g. Show the growth rates in percent
per year for the variables named on the following lines.
Annual dates with a quarterly file will give growth of one
year over the previous year. Similarly, if adjacent columns
are more than one year apart the multiple year annual rates
are supplied. For example, if the adjacent columns are 1988
and 1985, the rate displayed in the 1988 column is the anuual
rate of change from 1985 to 1988.
\ n
where n is the letter n. Cancel a previous \ g.
\ ar
use if monthly or quarterly data is given at annual rates
(the default). (ar = annual rates)
\ pr
use if monthly or quarterly data is given at monthly or
quarterly rates (pr = period rates).
A line beginning in any other way will be presumed to begin with a
variable name, such as gnp$, or an expression. For the expressions, all
the functions available in G are also available in COMPARE. After the
name or expression comes a ';', and after the ";" come up to thirty
characters which will be printed at the left side of the line. Leading
blanks -- blanks between the ";" and the first visible letter on the
line -- will be printed and can be used to indent the titles. I like to
use the suffix ".stb" in the names of such stub files, but the practice
is not necessary.
Once the ".stb" file is ready, we can run COMPARE by typing "compare".
As soon as COMPARE starts, it asks whether you want to see the alternatives
in actual values, as differences from the base run, as percentage
differences from the base, or whether you would like to see the growth
rates of all of the variables. Type the indicated letter and a 'Enter' to
show your choice. (If you are listing a data bank or a single run of a
model, it does not matter how you answer this question.) You will then be
asked for the name of the data bank containing the base run. Reply with
the bank name, including the suffix ".bnk", ".cbk", or ".hbk". Similarly
answer the questions about the names of the alternatives. An answer of
just an 'Enter' to any of these questions will terminate the questioning.
You will then be asked for the name of the stub file and you reply with
the name of the stub file you have prepared. (Use the full name, including
the ".stb".) Finally it asks for the name of the output file. I advise using
a ".out" suffix for these files. When COMPARE has finished and given the DOS
prompt again, you can use the DOS Print command to obtain a printed copy.
The ".out" file will contain a few commands to the IBM graphics printer.
They will work on this and compatible printers; other printers may cause
trouble. At present other printers are not supported but are not likely to
be of much interest for use with G because they will not print its graphs.
As an alternative to answering the individual questions asked by COMPARE,
you can put the answers into a file such as "comp.inp" on the distribution
disk and start the program with
compare < comp.inp
The "<" is a standard DOS device to tell a program to take all of the input
that it would normally take from the keyboard from the file following the
"<".